package org.iqiyi.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.iqiyi.entity.TypeEntity;
import org.iqiyi.service.TypeService;
import org.iqiyi.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.iqiyi.controller.TypeController;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author huqi
 * @since 2021-04-17
 */
@RestController
@RequestMapping("/type")
public class TypeController {
    @Autowired
    private TypeService typeService;

    @GetMapping("/getType")
    public JsonResult getType(String typeName){
        return JsonResult.success(typeService.getOne(new QueryWrapper<TypeEntity>().eq("type_name",typeName)));
    }
}

